<template>
  <h1>El-单选组件</h1>
  <el-radio-group v-model="edu">
    <el-radio label="学历：初中" value="初中"></el-radio>
    <el-radio label="学历：高中" value="高中"></el-radio>
    <el-radio label="学历：本科" value="本科" ></el-radio>
    <el-radio label="学历：硕士" value="硕士"></el-radio>
  </el-radio-group>
  <p>你的学历是:>{{edu}}</p>
  <hr>
  <el-radio-group v-model="p">
    <el-radio-button v-for="e in arr" :label="e.title" :value="e.price"></el-radio-button>
  </el-radio-group>
  <p>你选择的酒价是:>{{p}}</p>
</template>
<script setup>
  import {ref} from "vue";
  const edu = ref('本科');

  const arr = ref([
    {title:'茅台',price: '2000'},
      {title:'五粮液',price: '3000'},
      {title:'剑南春',price: '4000'}
  ])
  const p = ref('');
</script>


<style scoped>

</style>